/**
 *
 */
package com.naiterui.ehp.bp.constants;

/**
 * @author
 * @Description 常量
 */
public class CommonConstant {

    /**
     * 应用版本号
     */
    public static final String APP_VERSION = "0.0.1-SNAPSHOT";

    /**
     * 数据状态-有效
     */
    public static final boolean AVAILABLE_VALID = true;
    /**
     * 数据转台-无效
     */
    public static final boolean AVAILABLE_INVALID = false;

    /**
     * 医生推荐单状态 -未购
     */
    public static final int DOCTOR_RECOM_STATUS_NOT_BUY = 0;
    /**
     * 医生推荐单状态-已付款
     */
    public static final int DOCTOR_RECOM_STATUS_PAID = 1;
    /**
     * 医生推荐单状态-完成
     */
    public static final int DOCTOR_RECOM_STATUS_FINISH = 2;
    /**
     * 医生推荐单状态-取消
     */
    public static final int DOCTOR_RECOM_STATUS_CANCEL = 3;

    /**
     * 推广医生类型:商务代表推广
     */
    public static final int DOCTOR_SPREAD_TYPE_BUSINESS = 0;
    /**
     * 推广医生类型:医生推广
     */
    public static final int DOCTOR_SPREAD_TYPE_DOCTOR = 1;

    /**
     * redis key模块前缀-PS(point server)
     */
    public static final String REDIS_PRE_PS = "naiterui-ps|";
    /**
     * redis key模块前缀-DR
     */
    public static final String REDIS_PRE_DR = "naiterui-dr|";
    /**
     * redis key模块前缀-PT
     */
    public static final String REDIS_PRE_PT = "naiterui-pt|";
    /**
     * redis key模块前缀-BS(已废弃)
     */
    public static final String REDIS_PRE_BS = "naiterui-bs|";
    /**
     * redis key模块前缀-dy
     */
    public static final String REDIS_PRE_DY = "naiterui-dy|";
    /**
     * redis key模块前缀-IM
     */
    public static final String REDIS_PRE_IM = "naiterui-im|";
    /**
     * redis key模块前缀-CMS
     */
    public static final String REDIS_PRE_CMS = "naiterui-cms|";

    /**
     * redis key模块前缀-CMS
     */
    public static final String REDIS_PRE_DS = "naiterui-ds|";
    /**
     * redis key模块前缀-PC
     */
    public static final String REDIS_PRE_PC = "naiterui-pc|";
    /**
     * redis key模块前缀-RECOM
     */
    public static final String REDIS_PRE_RECOM = "naiterui-recom|";

    /**
     * redis key模块前缀-EHospital
     */
    public static final String REDIS_PRE_EHOSPITAL = "naiterui-ehospital|";

    /**
     * redis key模块前缀-EMR
     */
    public static final String REDIS_PRE_EMR = "naiterui-emr|";

    /**
     * redis key模块前缀-B2C
     */
    public static final String REDIS_PRE_B2C = "naiterui-b2c|";

    /**
     * redis key模块前缀-PHARMACIST
     */
    public static final String REDIS_PRE_PHARMACIST = "naiterui-pharmacist|";

    /**
     * redis key模块前缀-RECOM
     */
    public static final String REDIS_PRE_ESIGN = "naiterui-esign|";

    /**
     * redis key模块前缀-AGENT
     */
    public static final String REDIS_PRE_AGENT = "naiterui-agent|";

    /**
     * 积分服务-配置缓存KEY
     */
    public static final String PS_CONFIG_KEY = CommonConstant.REDIS_PRE_PS + "config";
    /**
     * redis key模块前缀-AE
     */
    public static final String REDIS_PRE_AE = "naiterui-ae|";
    /**
     * redis key模块前缀-search
     */
    public static final String REDIS_PRE_SEARCH = "naiterui-search|";
    /**
     * redis key模块前缀-微信
     */
    public static final String REDIS_PRE_WECHAT = "naiterui-wechat|";

    /** redis key模块前缀-SUPERVISE */
    public static final String REDIS_PRE_SUPERVISE = "naiterui-supervise|";


    /**
     * 平台患者端-微信
     */
    public static final int PLATFORM_PT_WX = 0;
    /**
     * 平台患者端-安卓
     */
    public static final int PLATFORM_PT_ANDROID = 4;
    /**
     * 平台患者端-iPhone
     */
    public static final int PLATFORM_PT_IPHONE = 5;
    /**
     * 平台医生端-微信
     */
    public static final int PLATFORM_DR_WX = 3;
    /**
     * 平台医生端-安卓
     */
    public static final int PLATFORM_DR_ANDROID = 1;
    /**
     * 平台医生端-iPhone
     */
    public static final int PLATFORM_DR_IPHONE = 2;
    /**
     * 平台商代端-微信
     */
    public static final int PLATFORM_BS_WX = 6;
    /**
     * 平台商代端-安卓
     */
    public static final int PLATFORM_BS_ANDROID = 7;
    /**
     * 平台商代端-iPhone
     */
    public static final int PLATFORM_BS_IPHONE = 8;

    /**
     * 医院展示状态-显示
     */
    public static final int HOSPITAL_DISPLAY_SHOW = 0;
    /**
     * 医院展示状态-隐藏
     */
    public static final int HOSPITAL_DISPLAY_HIDE = 1;

    /**
     * 提现状态-正常
     */
    public static final int WDR_STATUS_NORMAL = 1;
    /**
     * 提现状态-已提现
     */
    public static final int WDR_STATUS_APPLY = 2;

    /**
     * 医生邀请手机联系人-通过短消息邀请
     */
    public static final int DOCTOR_ADD_PHONE_PATIENT = 2;

    /**
     * 患者登录标识前缀
     */
    public static final String PT_APP_LOGIN_IN = REDIS_PRE_PT + "app_login_";

    /**
     * 签到回滚队列
     */
    public static final String SIGN_POOL_CALLBACK = REDIS_PRE_DR + "sin_pool_callback";
    /**
     * 签到回滚操作队列
     */
    public static final String SIGN_POOL_CALLBACK_DOING = REDIS_PRE_DR + "sin_pool_callback_doing";

    /**
     * 正大天晴-医生白名单key
     */
    public static final String LEGAL_CTTQ_DOCTOR_CACHE = REDIS_PRE_DR + "legal_cttq_doctor";

    /**
     * 辉瑞-医生白名单key
     */
    public static final String LEGAL_PFIZER_DOCTOR_CACHE = REDIS_PRE_DR + "legal_pfizer_doctor";
    /**
     * 辉瑞-万艾可药品名单key
     */
    public static final String LEGAL_PFIZER_MEDICATION_CACHE = REDIS_PRE_DR + "legal_pfizer_medication";
    /**
     * 辉瑞-业务到期时间
     */
    public static final String PFIZER_AVAILABLE_TIME = "pfizer.available.time";
    /**
     * 辉瑞-发展医生特定代表id
     */
    public static final String PFIZER_BUSINESS_ID = "pfizer.business.id";
    /**
     * 辉瑞-量表未填写提醒key
     */
    public static final String PFIZER_SCALE_NOT_FILLED_CACHE = REDIS_PRE_DR + "pfizer_scale_not_filled";
    /**
     * 辉瑞-量表妥投提醒key
     */
    public static final String PFIZER_SCALE_DELIVERED_REMIND_CACHE = REDIS_PRE_DR + "pfizer_scale_delivered_remind";
    /**
     * 辉瑞-量表周期提醒key
     */
    public static final String PFIZER_SCALE_CYCLE_REMIND_CACHE = REDIS_PRE_DR + "pfizer_scale_cycle_remind";

    /**
     * 图文咨询key
     */
    public static final String PT_MESSAGE_CONSULT = REDIS_PRE_PT + "consult_union";

    /**
     * 会话是否收费-收费
     */
    public static final int CONSULT_PAYTYPE_CHARGE = 1;
    /**
     * 会话是否收费-免费
     */
    public static final int CONSULT_PAYTYPE_FREE = 0;

    /**
     * 返回结果成功的code值
     */
    public static final int SUCCESS_CODE = 0;

    /**
     * 患者复购行为的key
     */
    public static final String PATIENT_RE_PURCHASE_KEY = REDIS_PRE_PT + "re_purchase";

    /**
     * 患者复购行为的key
     */
    public static final Integer RE_PURCHASE_SEND_CYCLE = 30;

    /**
     * 积分回掉同步下单时间到搜索服务数据 redis队列key
     */
    public static final String DR_SUB_ORDER_KEY = CommonConstant.REDIS_PRE_DR + "dr_sub_order_key";

    /**
     * 不获取患者昵称
     */
    public static final Integer FETCH_PT_NICKNAME_FALSE = 0;
    /**
     * 获取患者昵称
     */
    public static final Integer FETCH_PT_NICKNAME_TRUE = 1;

    /**
     * 付费图文咨询redis前缀
     */
    public static final String PAY_CONSULT_SESSION_KEY = CommonConstant.REDIS_PRE_IM + "consult_pay_";

    /**
     * 城市等级-全国
     */
    public static final Integer TYPE_ALL = 0;
    /**
     * 城市等级-省
     */
    public static final Integer TYPE_PRO = 1;
    /**
     * 城市等级-市
     */
    public static final Integer TYPE_CITYS = 2;
    /**
     * 城市等级-区
     */
    public static final Integer TYPE_REGI0N = 3;

    /**
     * 邀请类型-无(逻辑用)
     */
    public static final Integer INVITER_TYPE_NIL = -1;
    /**
     * 邀请类型-商代
     */
    public static final Integer INVITER_TYPE_BS = 0;
    /**
     * 邀请类型-医生
     */
    public static final Integer INVITER_TYPE_DR = 1;

    /**
     * 用户类型：1.商务代表
     */
    public static final Integer USER_TYPE_BUSINESS = 1;

    /**
     * 用户类型：2.医生
     */
    public static final Integer USER_TYPE_DOCTOR = 2;

    /**
     * 金数据量表问题类型:1.大标题
     */
    public static final int SCALE_QUESTION_TYPE_TITLE = 1;
    /**
     * 金数据量表问题类型: 2.文本
     */
    public static final int SCALE_QUESTION_TYPE_TEXT = 2;
    /**
     * 金数据量表问题类型:3.文件/图片
     */
    public static final int SCALE_QUESTION_TYPE_IMAGE = 3;
    /**
     * 金数据量表问题类型:矩阵填空，有行标题，列标题
     */
    public static final int SCALE_QUESTION_TYPE_MATRIX = 4;
    /**
     * 金数据量表问题类型:表格，只有列标题
     */
    public static final int SCALE_QUESTION_TYPE_TABLE = 5;
    /**
     * 金数据量表问题类型:矩阵单选，选择符号
     */
    public static final int SCALE_QUESTION_TYPE_MATRIX_RADIO = 6;

    /**
     * 阳光化订单积分签到状态回滚key
     */
    public static final String PUBLIC_ORDER_POINT_SIGNSTATUS_KEY = REDIS_PRE_DR + "sign_order_point_signstatus_rollback";

    /**
     * 根据医生和签到日期回滚积分池
     */
    public static final String SIGN_POOL_ROLLBACK_SIGNDATE_KEY = REDIS_PRE_DR + "sin_pool_roolback_signdate_";

    /**
     * 病历数据收集邀请通知有效期
     */
    public static final String RECOM_COLLECT_INVITE_TIME_KEY = REDIS_PRE_RECOM + "recom_collect_invite_time_";

    /**
     * 普通免费会话
     */
    public static final int CONSULT_TYPE_GNFREE = 0;

    /**
     * 普通付费会话
     */
    public static final int CONSULT_TYPE_GNCHARGE = 1;

    /**
     * 线上诊室找医生会话
     */
    public static final int CONSULT_TYPE_CONSULTROOM = 2;

    /**
     * 第一期活动找医生
     */
    public static final int CONSULT_TYPE_ACTIVITY = 3;

    /**
     * 是否有效-是
     */
    public static final Integer AVAILABLE_TRUE = 1;

    /**
     * 商品状态-正常
     */
    public static final Integer PRODUCT_STATUS_NORMAL = 0;
    /**
     * 商品状态-下架
     */
    public static final Integer PRODUCT_STATUS_OFF_SALE = 1;
    /**
     * 商品状态-删除
     */
    public static final Integer PRODUCT_STATUS_DELETED = 2;

    /*
     * 配送方式名称
     */
    public static String SHIPPING_METHOD_NAME = "京东快递";

    public static final String SYSTEM_DEFAULT_NAME = "SYSTEM";

    /**
     * 患者，咨询当前指向医生(k:patientId,v:doctorId)
     */
    public static final String CONSULT_PATIENT_AIM = REDIS_PRE_PT + "consult_patient_aim";
    /**
     * 患者，咨询当前指向医生姓名(k:patientId,v:doctorName)
     */
    public static final String CONSULT_PATIENT_AIM_NAME = REDIS_PRE_PT + "consult_patient_aim_name";

    /**
     * 患者，当前咨询的就诊人(k:patientId,v:inquirerId)
     */
    public static final String CONSULT_PATIENT_AIM_INQUIRER = REDIS_PRE_PT + "consult_patient_aim_inquirer";

    /**
     * 患者，当前咨询的病情信息(k:patientId,v:disease)
     */
    public static final String CONSULT_PATIENT_AIM_DISEASE = REDIS_PRE_PT + "consult_patient_aim_disease";
    /**
     * 客服消息发送数量统计
     */
    public static final String CONSULT_PATIENT_SEND_MSG_NUM = REDIS_PRE_PT + "custom_send_msg_num_";

    /*
     * 患者客服消息是否激活key
     */
    public static final String CONSULT_PATIENT_ACTIVE = REDIS_PRE_PT + "custom_active_";
    /**
     * 代表客服消息是否激活key
     */
    public static final String CONSULT_DEPUTY_ACTIVE = REDIS_PRE_DY + "custom_active_";

    /*
     * 患者是否同意免责协议
     * 患者是否同意免责协议开关
     */
    public static final String CONSULT_DISCLAIMER_ACTIVE = REDIS_PRE_PT + "disclaimer";
    public static final String CONSULT_DISCLAIMER_SWITCH = REDIS_PRE_PT + "disclaimer_switch";

    public static final String CONSULT_MEDICAL_RECORD_EXIST = REDIS_PRE_IM + "exist_medicalrecord";

    /**
     * 咨询医生发送消息
     */
    public final static String CONSULT_DOCTOR_SEND_MESSAGE_CACHE = REDIS_PRE_IM + "dcotor_send_message";

    //====短信验证码==============
    /**
     * 验证码错误规则的redis key的count字段以及默认值
     */
    public static final String VALID_COUNT_FIELD = "count";
    public static final int DEFAULT_COUNT_FIELD = 20;
    /**
     * 验证码错误规则的redis key的time字段以及默认值
     */
    public static final String VALID_TIME_FIELD = "time";
    public static final int DEFAULT_TIME_FIELD = 10 * 60;

    /**
     * 用于IP定位转换
     */
    public static final String REGION = "内网IP|内网IP";

    /**
     * 签名：服务商和签章类型
     */
    public static final String ESIGN_SERVICE_NAME_KEY = REDIS_PRE_ESIGN + "esign_service_name";
    public static final String ESIGN_SEAL_TYPE_KEY = REDIS_PRE_ESIGN + "esign_seal_type";

    /**
     * 处方流转平台调用token信息缓存key
     */
    public static final String RDS_PRESCRIPTION_PLATFORM_TOKEN_KEY = REDIS_PRE_B2C + "prescription_platform_token";
    /**
     * 签名免签key
     */
    public static final String ESIGN_NO_SECRET_KEY = "1234567890SECRET";

    /**
     * 医生免密提醒key
     */
    public static final String PH_NO_SECRET_REMIND = REDIS_PRE_PHARMACIST + "no_secret_remind_";

    /**
     * 药师免密提醒key
     */
    public static final String DR_NO_SECRET_REMIND = REDIS_PRE_DR + "no_secret_remind_";

    public interface ConsultType {

        /**
         * 图文问诊
         */
        public static final int GRAPHIC = 1;
        /**
         * 视频问诊
         */
        public static final int VIDEO = 2;
    }

    /**
     * 患者医生首次绑定
     */
    public static final String PATIENT_PERSONAL_DOCTOR_FIRST_BIND = "patient_personal_doctor_first_bind:";

    /**
     * 绑定药师
     */
    public static final String IDENTITY_REDISKEY = REDIS_PRE_CMS + "medicationrecom_identity_";
    /**
     * 绑定药师-药师id
     */
    public static final String IDENTITY_PH_REDISKEY = REDIS_PRE_CMS + "medicationrecom_identity_ph_";
    /**
     * 绑定药师-key
     */
    public static final String IDENTITY_KEY_REDISKEY = REDIS_PRE_CMS + "medicationrecom_identity_key_";
    /**
     * 绑定药师-key缓存时间 5分钟
     */
    public static final int IDENTITY_KEY_EXPIRED_REDISKEY = 5 * 60;

    /**
     * 自动审核药师-key
     */
    public static final String AUTO_AUDIT_PHARMACIST_KEY = "auto_audit_pharmacist";

    /**
     * 处方不自动分配标识
     */
    public static final String NOT_AUTO_ASSIGN_RECOM = "not_auto_assign_recom:";

    /**
     * 自动审核药师-key
     */
    public static final String ALLOCATE_AUDIT_PHARMACIST_KEY = "allocate_audit_pharmacist";
    /**
     * 视频问诊素材key
     */
    public static final String VIDEO_CONSULT_THUMB_MEDIA_CACHE_KEY = "video-consult-thumb-media";

    public static final String REDIS_PRE_PHARMACIST_AUTHID_CACHE_KEY = REDIS_PRE_PHARMACIST + "authId_";

    public static final String REDIS_PRE_PHARMACIST_AUTHID_CHECK_CACHE_KEY = REDIS_PRE_PHARMACIST + "authId_check_";

    /**
     * 视频问诊自动取消时间 - 180分钟
     */
    public static final int VIDEO_CONSULT_AUTO_CANCEL_TIME = 60 * 3;

    /**
     * 城市列表缓存key
     */
    public static final String DOCTOR_CITY_LSIT_CACHE_KEY = REDIS_PRE_DR + "city_all";

    /**
     * 表单数据缓存
     */
    public static final String DESIGN_FORM_DATA_CHCHE_KEY = "design_form:";

    /**
     * 表单数据缓存失效48小时
     */
    public static final int DESIGN_FORM_DATA_CHCHE_KEY_EXPIRED = 48 * 60 * 60;

    /**
     * 经纪人处方排行榜
     */
    public static final String AGENT_RECIPEL_RANKING = REDIS_PRE_AGENT + "recipel_ranking";

    /**
     * 经纪人邀请客户加密key
     */
    public static final String AGENT_INVITE_CUSTOM_DES_SECRET = "uteriqpl";

    /**
     * 医生端版本检查key
     */
    public static final String DR_VERSION_CHECK_KEY = CommonConstant.REDIS_PRE_DR + "version_check_";
    public static final String DR_FORCE_VERSION_KEY = CommonConstant.REDIS_PRE_DR + "ver_force_";

    /**
     * 药师端版本检查key
     */
    public static final String PH_VERSION_CHECK_KEY = CommonConstant.REDIS_PRE_PHARMACIST + "version_check_";
    public static final String PH_FORCE_VERSION_KEY = CommonConstant.REDIS_PRE_PHARMACIST + "ver_force_";

    /**
     * 监管推送医生列表-key
     */
    public static final String SUPERVISE_PUSH_DOCTOR_LIST_KEY = CommonConstant.REDIS_PRE_SUPERVISE + "push_doctor_list";
    /**
     * 监管推送药师列表-key
     */
    public static final String SUPERVISE_PUSH_PHARMACIST_LIST_KEY =
            CommonConstant.REDIS_PRE_SUPERVISE + "push_pharmacist_list";
    /**
     * 监管推送商家列表-key
     */
    public static final String SUPERVISE_PUSH_WAREHOUSE_LIST_KEY =
            CommonConstant.REDIS_PRE_SUPERVISE + "push_warehouse_list";

    /**
     * 监管同步开关-key
     */
    public static final String SUPERVISE_SYNCHRONIZE_KEY = CommonConstant.REDIS_PRE_SUPERVISE + "synchronize";

}
